/**
 * OW2 FraSCAti Examples : HelloWorld POJO
 * Copyright (C) 2008-2010 INRIA, University of Lille 1
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 *
 * Author: Haderer Nicolas
 *
 * Contributor(s): 
 */
package fr.univlille1.pji96.basex.api;

import java.io.File;

public interface IDatabase {

	
public void create(String name) throws Exception;
	
	public Boolean exist(String name) throws Exception;
	
	public void open(String name) throws Exception;
	
	public void close() throws Exception;
	
	public void drop(String name) throws Exception;
	
	public String query(String query) throws Exception;
	
	public String query(String[] argNames, String[] argValue, String[] argTypes, String query)throws Exception;
	
	public String commmand(String command) throws Exception;
	
	public void insertFile(File file) throws Exception;
	
	public void initSession(String host, String port, String user, String password) throws Exception;
	
	
	/**
	 * 	Grants the specified permission to the specified [user].
	 *  The Glob syntax can be used to address more than one database or user. 
	 *  List of permission [NONE|READ|WRITE|CREATE|ADMIN]
	 */
	public void grant(String user, String permission, String dbName)throws Exception;
	
	
	public void createUser(String username, String password)throws Exception;
	
	
	public void dropUser(String user)throws Exception;
	
	
	public void endSession()throws Exception;
	
	
}
